﻿@using Newtouch.Infrastructure;
@{
    Layout = null;
}
<div id="floatLeftMostPartDiv" style="display:none;">
    @*<div data-href="dqcf"><span>当前处方</span></div>*@
    <div data-href="lscf"><span>历史处方</span></div>
    <div data-href="cfmb"><span>处方模板</span></div>
</div>

<script>
    $("#floatLeftMostPartDiv div").on("click", function (e) {
        e.preventDefault();
        if ($(this).hasClass('activepart')) {
            //再点击 隐藏
            $("#floatLeftMostPartDiv div").removeClass("activepart");
            $('#floadHistoryPresTree').hide();
            $('#floatPreTemplateTree').hide();
        }
        else {
            $("#floatLeftMostPartDiv div").removeClass("activepart");
            $(this).addClass("activepart");

            var fromcflx;
            var currPage = $('#myTab li.active>a').attr('href');    //判断当前是哪一页签
            if (currPage == "#linkkfcf") {
                fromcflx = '@Html.Raw(((int)EnumCflx.RehabPres).ToString())';
            }
            if (currPage == "#linkcgxmcf") {
                fromcflx = '@Html.Raw(((int)EnumCflx.RegularItemPres).ToString())';
            }
            if (currPage == "#linkxycf") {
                fromcflx = '@Html.Raw(((int)EnumCflx.WMPres).ToString())';
            }
            if (currPage == "#linkzycf") {
                fromcflx = '@Html.Raw(((int)EnumCflx.TCMPres).ToString())';
            }
            if (currPage == "#linkzycfnew") {
                fromcflx = '@Html.Raw(((int)EnumCflx.TCMPres).ToString())';
            }
            if ($(this).attr("data-href") == "cfmb") {
                $('#floadHistoryPresTree').hide();
                $('#floatPreTemplateTree').show();

                window.SetCurrentPageCflx(fromcflx);
            }
            else if ($(this).attr("data-href") == "lscf") {
                $('#floatPreTemplateTree').hide();
                $('#floadHistoryPresTree').show();
                window.initHistoryPresTree(fromcflx);
            }
        }
    });
</script>